package com.cloud.api.domain.tsp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "t_vehicle_data",autoResultMap = true)
@Schema(name = "VehicleDataVo")
public class VehicleDataVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "报文时间")
    private LocalDateTime opTime;

    @Schema(description = "命令标识")
    private String commandType;

    @Schema(description = "报文时间 年月日")
    private LocalDate dt;

    //整车数据

    @Schema(description = "车辆vin")
    private String vin;

    @Schema(description = "总电压")
    private String totalVoltage;

    @Schema(description = "总电流")
    private String totalCurrent;

    @Schema(description = "DC-DC状态")
    private String dcState;

    @Schema(description = "挡位")
    private String gear;

    @Schema(description = "车速")
    private String speed;

    @Schema(description = "绝缘电阻")
    private String insulationResistance;

    @Schema(description = "加速踏板行程值")
    private String accelerationPedalTravelValue;

    @Schema(description = "制动踏板状态")
    private String brakePedalStatus;

    @Schema(description = "动力蓄电池编码")
    private String batteryPackCode;

    @Schema(description = "ICCID")
    private String iccid;

    @Schema(description = "充电状态")
    private String chargeState;

    @Schema(description = "可充电储能系统编码集合")
    private Object rechargeableSubsystemsCodes;

    @Schema(description = "soc 剩余电量")
    private String soc;

    @Schema(description = "总里程")
    private String accumulativeMileage;

    @Schema(description = "车辆状态")
    private String vehicleState;

    @Schema(description = "运行模式")
    private String operationalMode;

    //驱动电机数据

    @Schema(description = "电机控制器温度")
    private String motorControllerTemperature;

    @Schema(description = "驱动电机序号")
    private String driveMotorNo;

    @Schema(description = "电机控制器电流")
    private String motorControllerCurrent;

    @Schema(description = "电机控制器电压")
    private String motorControllerVoltage;

    @Schema(description = "电机转速")
    private String motorSpeed;

    @Schema(description = "驱动电机状态")
    private String driveMotorStatus;

    @Schema(description = "电机转矩")
    private String motorTorque;

    @Schema(description = "驱动电机温度")
    private String motorTemperature;

    @Schema(description = "驱动电机个数")
    private String driveMotorCount;

    //燃料电池数据

    @Schema(description = "燃料电池电流")
    private String fuelcellCurrent;

    @Schema(description = "燃料电池电压")
    private String fuelcellVoltage;

    @Schema(description = "燃料消耗率")
    private String fuelConsumption;

    @Schema(description = "高压DC/DC状态")
    @TableField("fuelcell_dc_status")
    private String fuelcellDcStatus;

    @Schema(description = "氢气最高浓度")
    private String hydrogenSystemMaxConcentration;

    @Schema(description = "氢气最高浓度传感器代号")
    private String hydrogenSystemMaxConcentrationProbeNum;

    @Schema(description = "氢气最高压力")
    private String hydrogenSystemMaxPressure;

    @Schema(description = "氢气最高压力传感器代号")
    private String hydrogenSystemMaxPressureProbeNum;

    @Schema(description = "氢系统中最高温度")
    private String hydrogenSystemMaxTemperature;

    @Schema(description = "氢系统中最高温度探针代号")
    private String hydrogenSystemMaxTemperatureProbeNum;

    @Schema(description = "燃料电池温度探针总数")
    private String temperatureProbeCount;

    @Schema(description = "探针温度值集合")
    private Object probeTemperature;

    //发动机数据

    @Schema(description = "发动机状态")
    private String engineStatus;

    @Schema(description = "发动机曲轴转速")
    private String engineCrankshaftSpeed;

    //车辆位置数据

    @Schema(description = "纬度")
    private BigDecimal lat;

    @Schema(description = "纬度类型")
    private String latitudeDataType;

    @Schema(description = "经度")
    private BigDecimal lng;

    @Schema(description = "经度类型")
    private String longitudeDataType;

    @Schema(description = "定位状态")
    private String status;

    @Schema(description = "位置信息")
    private  String addr;

    //极值数据

    @Schema(description = "电池单体电压最高值")
    private String batteryMaxVoltage;

    @Schema(description = "最高温度值")
    private String maxTemperature;

    @Schema(description = "最低温度值")
    private String minTemperature;

    @Schema(description = "最高温度子系统号")
    private String maxTemperatureSystemNum;

    @Schema(description = "最高温度探针序号")
    private String maxTemperatureNum;

    @Schema(description = "最高电压电池单体代号")
    private String maxVoltageBatteryNum;

    @Schema(description = "最高电压电池子系统号")
    private String maxVoltageSystemNum;

    @Schema(description = "电池单体电压最低值")
    private String batteryMinVoltage;

    @Schema(description = "最低温度子系统号")
    private String minTemperatureSystemNum;

    @Schema(description = "最低温度探针序号")
    private String minTemperatureNum;

    @Schema(description = "最低电压电池单体代号")
    private String minVoltageBatteryNum;

    @Schema(description = "最低电压电池子系统号")
    private String minVoltageSystemNum;

    //报警数据

    @Schema(description = "报警列表")
    private Object alarmCodes;

    @Schema(description = "驱动电机故障信息列表")
    private Object driveMotorFailureCodes;

    @Schema(description = "发动机故障信息列表")
    private Object engineFailureCodes;

    @Schema(description = "通用报警标志")
    private Long alarmInfo;

    @Schema(description = "通用报警标志")
    private List<String> alarmInfoList;

    @Schema(description = "最高报警等级")
    private String level;

    @Schema(description = "驱动电机故障总数")
    private String driveMotorFailureCount;

    @Schema(description = "可储能装置故障总数")
    private String deviceFailureCount;

    @Schema(description = "可储能装置故障信息列表")
    private Object deviceFailureCodes;

    @Schema(description = "发动机故障总数")
    private String engineFailureCount;

    @Schema(description = "其他故障总数")
    private String otherFailure;

    //电池包温度

    @Schema(description = "电池包温度纵坐标:探针温度值列表")
    private Object subsystemTemperatures;

    @Schema(description = "可充电储能装置温度探针个数")
    private String subsystemTemperatureProbeCount;

    //电池包电压

    @Schema(description = "本帧单体电池总数")
    private Short batteryCount;

    @Schema(description = "单体电池电压列表")
    private Object cellVoltages;

    //终端数据
    @Schema(description = "可充电储能装置电压子系统个数")
    private String subsystemVoltageCount;

    @Schema(description = "可充电储能装置电压子系统号")
    private Short rechargeableSubsystemsNum;

    @Schema(description = "可充电储能装置电压")
    private String rechargeableSubsystemsVoltage;

    @Schema(description = "可充电储能装置电流")
    private String rechargeableSubsystemsCurrent;

    @Schema(description = "单体电池总数")
    private String rechargeableSubsystemsCellCount;

    @Schema(description = "本帧起始电池序号")
    private Short rechargeableSubsystemsBatteryNumber;

    @Schema(description = "车辆报文")
    private String record;

    @Schema(description = "车辆报文长度")
    private Integer recordLength;

    @Schema(description = "偏移量")
    @TableField(value = "start_offset",typeHandler = JacksonTypeHandler.class)
    private Map<String,Integer> startOffset;

}
